package psd.model.Prolog;

import org.eclipse.jdt.core.dom.ASTNode;

import psd.model.ModelGenerator;
import psd.model.Prolog.Converters.PrologConstants;

public class PrologModelGenerator extends ModelGenerator {

	private int factsCounter;
	private FactGenerationToolbox generationToolBox = null;

	public PrologModelGenerator() {
		super();
		generationToolBox = new DefaultGenerationToolbox();
		this.setConverterFactory(new PrologConverterFactory(generationToolBox));
		factsCounter = 1;
	}

	public void preVisit(ASTNode node) {
		setNodeId(node);
	}

	private void setNodeId(ASTNode node) {
		node.setProperty(PrologConstants.PROLOG_ID_PROPERTY, factsCounter++);
	}

}
